//
//  QJUIMapping.m
//  QJWork
//
//  Created by qijia on 15/6/1.
//  Copyright (c) 2015年 高中雷. All rights reserved.
//

#import "QJUIMapping.h"

@implementation QJUIMapping

+(QJUIMapping*)mapping {
    static QJUIMapping  * sharedInstance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedInstance = [[self alloc] init];
    });
    return sharedInstance;
}

-(QJTableView*)tableControlWithTableView:(UITableView*)tableview withDelegate:(id<QJTableControlDelegate>)delegate withContainer:(id<QJCellControlClientDelegate>)containerDelegate {
    QJTableView *control = [[QJTableView alloc] initWithTableView:tableview];
    control.delegate = delegate;
    control.containerDelegate = containerDelegate;
    tableview.delegate = control;
    tableview.dataSource = control;
    
    return control;
}

@end
